/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package bean.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author server
 */
@Embeddable
public class InterviewsPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "VacancyID")
    private String vacancyID;
    @Basic(optional = false)
    @Column(name = "ApplicantID")
    private String applicantID;
    @Basic(optional = false)
    @Column(name = "EmpNo")
    private String empNo;

    public InterviewsPK() {
    }

    public InterviewsPK(String vacancyID, String applicantID,String empNo) {
        this.vacancyID = vacancyID;
        this.applicantID = applicantID;
        this.empNo = empNo;
    }

    public String getVacancyID() {
        return vacancyID;
    }

    public void setVacancyID(String vacancyID) {
        this.vacancyID = vacancyID;
    }

    public String getApplicantID() {
        return applicantID;
    }

    public void setApplicantID(String applicantID) {
        this.applicantID = applicantID;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (vacancyID != null ? vacancyID.hashCode() : 0);
        hash += (applicantID != null ? applicantID.hashCode() : 0);
        hash += (empNo != null ? empNo.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof InterviewsPK)) {
            return false;
        }
        InterviewsPK other = (InterviewsPK) object;
        if ((this.vacancyID == null && other.vacancyID != null) || (this.vacancyID != null && !this.vacancyID.equals(other.vacancyID))) {
            return false;
        }
        if ((this.applicantID == null && other.applicantID != null) || (this.applicantID != null && !this.applicantID.equals(other.applicantID))) {
            return false;
        }
         if ((this.empNo == null && other.empNo != null) || (this.empNo != null && !this.empNo.equals(other.empNo))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "bean.entity.InterviewsPK[vacancyID=" + vacancyID + ", applicantID=" + applicantID + ", empNo=" + empNo + "]";
    }

    /**
     * @return the empNo
     */
    public String getEmpNo() {
        return empNo;
    }

    /**
     * @param empNo the empNo to set
     */
    public void setEmpNo(String empNo) {
        this.empNo = empNo;
    }

}
